package com.oo.polymorphic_4.area;

import java.util.Scanner;

/**
 * Rectangle--${description}
 *
 * @author: Jovi
 * @createTime: 2017-05-09 16:24
 **/
public class Rectangle extends Shape {

    public Rectangle() {
    }

    public Rectangle(String name) {
        super(name);
    }

    @Override
    public void getArea() {
        System.out.println("请输入矩形的底：");
        Scanner sc = new Scanner(System.in);
        int bottom = sc.nextInt();
        System.out.println("请输入矩形的高：");
        int high = sc.nextInt();
        System.out.println("矩形的面积是："+bottom*high);
    }
}
